package com.saas.sql;

public class WorkQuery
{
  public static String work_SEL_WORK_BY_NAME = "select jobs_id,name,sex,education,account,address,add_date from work where name like :VNAME order by add_date desc";
  public static String work_SEL_WORK_BY_START = "select jobs_id,name,sex,education,account,address,add_date from work where name like :VNAME and date(add_date) >= :VSTART_DATE order by add_date desc";
  public static String work_SEL_WORK_BY_END = "select jobs_id,name,sex,education,account,address,add_date from work where name like :VNAME and date(add_date) <= :VEND_DATE order by add_date desc";
  public static String work_SEL_WORK_BY_DATE = "select jobs_id,name,sex,education,account,address,add_date from work where date(add_date) >= :VSTART_DATE and date(add_date) <= :VEND_DATE and name like :VNAME order by add_date desc";
  public static String work_SEL_WORK_BY_ID = "select jobs_id,name,sex,features,education,learning_ec,experience,phone,mobile,email,qq,msn,birthplace,account,intention,request,personal_id,address,add_date from work where jobs_id=:VJOBS_ID";
  public static String work_DELETE_WORK_BY_ID = "delete from work where jobs_id=:VJOBS_ID";
  public static String work_INS_WORK_ONE = "INSERT into work(jobs_id,NAME,sex,education,features,learning_ec,experience,phone,mobile,email,qq,msn,birthplace,account,intention,request,personal_id,address,add_date) values(:VJOBS_ID,:VNAME,:VSEX,:VEDUCATION,:VFEATURES,:VLEARNING_EC,:VEXPERIENCE,:VPHONE,:VMOBILE,:VEMAIL,:VQQ,:VMSN,:VBIRTHPLACE,:VACCOUNT,:VINTENTION,:VREQUEST,:VPERSONAL_ID,:VADDRESS,now())";
  public static String work_SEL_WORK_BY_KEYWORD_DAY = "SELECT w.add_date,w.jobs_id,w.name,w.sex,w.education,w.request,w.address,w.intention,w.class_id,wl.store_path,wl.article_rule FROM WORK w INNER JOIN work_class wl ON w.class_id=wl.class_id WHERE w.intention like :VKEYWORD AND w.add_date<=NOW() AND TO_DAYS(NOW())-TO_DAYS(w.add_date)<=7";
  public static String work_SEL_WORK_BY_KEYWORD_MONTH = "SELECT w.add_date,w.jobs_id,w.name,w.sex,w.education,w.request,w.address,w.intention,w.class_id,wl.store_path,wl.article_rule FROM WORK w INNER JOIN work_class wl ON w.class_id=wl.class_id WHERE w.intention like :VKEYWORD AND w.add_date<=NOW() AND TO_DAYS(NOW())-TO_DAYS(w.add_date)<=30";
  public static String work_SEL_WORK_BY_KEYWORD_YEAR = "SELECT w.add_date,w.jobs_id,w.name,w.sex,w.education,w.request,w.address,w.intention,w.class_id,wl.store_path,wl.article_rule FROM WORK w INNER JOIN work_class wl ON w.class_id=wl.class_id WHERE w.intention like :VKEYWORD AND w.add_date<=NOW() AND TO_DAYS(NOW())-TO_DAYS(w.add_date)<=365";
}

